"""
API依赖注入
"""
from typing import Generator
from fastapi import Depends, HTTPException
from sqlalchemy.orm import Session

from app.core.database import get_db
from app.services.character_service import CharacterService

def get_character_service(db: Session = Depends(get_db)) -> CharacterService:
    """获取人物服务实例"""
    return CharacterService(db)